/**
 * 
 */
package com.google.code.onlineshopping4j.model;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author TelmilaJ
 *
 */
@Entity
@Table(name="product_category")
public class ProductCategory extends BaseModel implements Serializable {
	
	private static final long serialVersionUID = -2324594548388581441L;

	@ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "product", nullable=false)
	private Product product;
	
	@ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "category", nullable=false)	
	private Category category;

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

}
